package com.example.chengche_lol.ui.news;

import android.view.View;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.example.chengche_lol.R;
import com.example.chengche_lol.adapter.NewsMatchAdapter;
import com.example.chengche_lol.base.BaseFragment;
import com.example.chengche_lol.beans.NewsMatchBean;


public class NewsMatchFragment extends BaseFragment {

    private RecyclerView mRecyclerView;
    private NewsMatchAdapter matchAdapter;

    @Override
    protected int rootLayout() {
        return R.layout.fragment_news_game;
    }

    @Override
    protected void initView(View view) {
        mRecyclerView = view.findViewById(R.id.game_recycview);
    }

    @Override
    protected void initData() {

        matchAdapter = new NewsMatchAdapter();

        NewsMatchBean m1 = new NewsMatchBean("LPL春季赛3月8日首发名单，Xiaohu上路交手zs",R.drawable.kaitolen,"LOL","英雄联盟官方","73");
        matchAdapter.addData(m1);
        NewsMatchBean m2 = new NewsMatchBean("【女明星日常98】重铸郭门荣光，郭泫雅永不过时！",R.drawable.mrsguo,"迷人的郭老师","郭子","9999999");
        matchAdapter.addData(m2);
        NewsMatchBean m3 = new NewsMatchBean("新忍村大战————IGvsTES复盘",R.drawable.longya,"LOL","小Xixi","7849");
        matchAdapter.addData(m3);
        NewsMatchBean m4 = new NewsMatchBean("我国著名红色歌姬登场2021年中央电视台春节联欢晚会并且一直在天上飞",R.drawable.tianyifei,"Vsinger官方","洛天依","988888");
        matchAdapter.addData(m4);
        NewsMatchBean m5 = new NewsMatchBean("Piapro Character出版社的编辑表示，某15岁男明星与某K姓男歌手疑似在北海道同泡温",R.drawable.kaitolen,"初音未来_Crypton","镜音连","683473");
        matchAdapter.addData(m5);
        NewsMatchBean m6 = new NewsMatchBean("日前，海鲜市场上的章鱼不断涨价，涨价原因暂时不明，可能与某粉发女星有关",R.drawable.luka,"初音未来_Crypton","巡音流歌","3467845");
        matchAdapter.addData(m6);
        NewsMatchBean m7 = new NewsMatchBean("LPL春季赛3月8日首发名单，Xiaohu上路交手zs",R.drawable.kaitolen,"LOL","英雄联盟官方","73");
        matchAdapter.addData(m7);
        NewsMatchBean m8 = new NewsMatchBean("【女明星日常98】重铸郭门荣光，郭泫雅永不过时！",R.drawable.mrsguo,"迷人的郭老师","郭子","9999999");
        matchAdapter.addData(m8);
        NewsMatchBean m9 = new NewsMatchBean("新忍村大战————IGvsTES复盘",R.drawable.longya,"LOL","小Xixi","7849");
        matchAdapter.addData(m9);
        NewsMatchBean m10 = new NewsMatchBean("我国著名红色歌姬登场2021年中央电视台春节联欢晚会并且一直在天上飞",R.drawable.tianyifei,"Vsinger官方","洛天依","988888");
        matchAdapter.addData(m10);
        NewsMatchBean m11 = new NewsMatchBean("Piapro Character出版社的编辑表示，某15岁男明星与某K姓男歌手疑似在北海道同泡温",R.drawable.kaitolen,"初音未来_Crypton","镜音连","683473");
        matchAdapter.addData(m11);
        NewsMatchBean m12 = new NewsMatchBean("日前，海鲜市场上的章鱼不断涨价，涨价原因暂时不明，可能与某粉发女星有关",R.drawable.luka,"初音未来_Crypton","巡音流歌","3467845");
        matchAdapter.addData(m12);
    }

    @Override
    protected void bindData() {
        super.bindData();
        mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
        mRecyclerView.setAdapter(matchAdapter);

    }

    @Override
    protected void bindEvent() {

    }
}
